Skip to content

chore: remove all VR support#2475

Merged
doodlum merged 20 commits into
devfrom
claude/vigilant-haslett-56bad5
Jun 7, 2026
Merged

chore: remove all VR support#2475
doodlum merged 20 commits into
devfrom
claude/vigilant-haslett-56bad5

Conversation

@doodlum

@doodlum doodlum commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Completely removes Skyrim VR as a supported target. All VR-specific code paths, shaders, build system options, runtime checks, and eyeIndex parameters are eliminated. The project now targets SE/AE only and compiles with ENABLE_SKYRIM_VR=OFF.

What changed

Build system

  • Remove ENABLE_SKYRIM_VR: ON from CMakePresets.json (ALL, ALL-VS2022)
  • Remove SkyrimVR data path from CMakeUserPresets.json.template
  • Remove VR shader validation CI matrix entry and delete .github/configs/shader-validation-vr.yaml

Deleted source files

  • src/Features/VR.cpp/h and entire src/Features/VR/ directory (InSceneOverlay, Input, OpenVRDetection, OverlayDrag, SettingsUI, StereoBlend, WandPointing)
  • src/Features/VRStereoOptimizations.cpp/h
  • src/Utils/VRUtils.cpp/h
  • features/VR/ (CORE marker, VR.ini)
  • package/Shaders/VR/ (StereoBlendCS, VRPostProcessCS, InSceneOverlay shaders)
  • package/Shaders/VRStereoOptimizations/ (all shaders, cbuffers, modes)
  • package/Shaders/ISFullScreenVR.hlsl
  • package/Shaders/Tests/TestVR.hlsl, TestVRFlat.hlsl
  • package/Shaders/Common/VR.hlsli (zero callers remaining)
  • features/Screen Space GI/Shaders/ScreenSpaceGI/stereoSync.cs.hlsl
  • features/Screen-Space Shadows/Shaders/ScreenSpaceShadows/StereoSyncCS.hlsl

Core C++ changes

  • Globals.h/cpp: remove FrameBufferVR, VR globals, VR D3D hooks, isVR game namespace var
  • FrameBufferCache getters: remove eyeIndex parameters, remove IsVR() branches
  • Feature.cpp: remove VR feature list filtering and SupportsVR() checks
  • Deferred.cpp: remove stereo optimization dispatch, stereo blend, VR cbuffer binding
  • ShaderCache.cpp/h: remove VR define injection, VR cbuffer offsets, ISFullScreenVR mapping
  • Game.h/cpp: remove GetEyePosition(int), GetCameraData(int) VR overloads; simplify all getters
  • XSEPlugin.cpp: remove VR address library check and EngineFixesVR fallback
  • Remove all REL::Module::IsVR() / #ifdef ENABLE_SKYRIM_VR branches throughout

Shader changes

  • FrameBuffer.hlsli: convert all 12 cbuffer members from [1] arrays to plain variables; remove eyeIndex from all helper functions
  • Remove eyeIndex parameters from ShadowSampling.hlsli, MotionBlur.hlsli, SharedData.hlsli and ~30 feature shaders
  • Remove all #ifdef VR / #if defined(VR) dead code blocks (ISTemporalAA.hlsl, Lighting.hlsl, RunGrass.hlsl, Water.hlsl, etc.)
  • Remove Stereo:: namespace calls (functions were identity stubs with no callers)

Verification

  • BuildRelease.bat ALL succeeds
  • ✅ All 134 shader unit tests pass
  • ✅ No remaining VR, IsVR, eyeIndex, OpenVR, ENABLE_SKYRIM_VR, or stereoSync references in src/, package/Shaders/, or features/
  • ✅ No changes to extern/ (CommonLibSSE-NG and other dependencies untouched)

Reviewer notes

  • The extern/CommonLibSSE-NG submodule is not modified — it still contains VR interfaces internally, but none are referenced by this project anymore
  • FrameBuffer cbuffer members are now plain float4x4 variables instead of [1] arrays — any future shader that tries to index them with [eyeIndex] will get a compile error, which is intentional
  • The Stereo namespace in VR.hlsli is deleted entirely since nothing included that file anymore

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 197 files, which is 47 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5a0bfb6f-a53b-4873-a6d3-c6604cfc4e49

📥 Commits

Reviewing files that changed from the base of the PR and between 29cb5e6 and 7ceb37d.

📒 Files selected for processing (197)
  • .claude/CLAUDE.md
  • .coderabbit.yaml
  • .github/configs/README.md
  • .github/configs/generate-shader-configs.ps1
  • .github/configs/shader-validation-vr.yaml
  • .github/copilot-instructions.md
  • .github/workflows/_shared-build.yaml
  • AI-INSTRUCTIONS.md
  • CMakePresets.json
  • CMakeUserPresets.json.template
  • README.md
  • containerbuild.ps1
  • docs/development/README.md
  • docs/development/shader-workflow.md
  • docs/new-feature-template/NewFeature.h
  • docs/new-feature-template/NewFeatureReadme.md
  • features/Dynamic Cubemaps/Shaders/DynamicCubemaps/UpdateCubemapCS.hlsl
  • features/Exponential Height Fog/Shaders/ExponentialHeightFog/ExponentialHeightFog.hlsli
  • features/Exponential Height Fog/Shaders/ExponentialHeightFog/VolumetricFogCSCommon.hlsli
  • features/Exponential Height Fog/Shaders/ExponentialHeightFog/VolumetricFogConservativeDepthCS.hlsl
  • features/Exponential Height Fog/Shaders/ExponentialHeightFog/VolumetricFogIntegrationCS.hlsl
  • features/Exponential Height Fog/Shaders/ExponentialHeightFog/VolumetricFogLightScatteringCS.hlsl
  • features/Exponential Height Fog/Shaders/ExponentialHeightFog/VolumetricFogMaterialCS.hlsl
  • features/Extended Materials/Shaders/ExtendedMaterials/ExtendedMaterials.hlsli
  • features/Grass Collision/Shaders/GrassCollision/GrassCollision.hlsli
  • features/Hair Specular/Shaders/Hair/Hair.hlsli
  • features/Light Limit Fix/Shaders/LightLimitFix/ClusterBuildingCS.hlsl
  • features/Light Limit Fix/Shaders/LightLimitFix/ClusterCullingCS.hlsl
  • features/Light Limit Fix/Shaders/LightLimitFix/Common.hlsli
  • features/Screen Space GI/Shaders/ScreenSpaceGI/blur.cs.hlsl
  • features/Screen Space GI/Shaders/ScreenSpaceGI/common.hlsli
  • features/Screen Space GI/Shaders/ScreenSpaceGI/gi.cs.hlsl
  • features/Screen Space GI/Shaders/ScreenSpaceGI/prefilterDepths.cs.hlsl
  • features/Screen Space GI/Shaders/ScreenSpaceGI/radianceDisocc.cs.hlsl
  • features/Screen Space GI/Shaders/ScreenSpaceGI/stereoSync.cs.hlsl
  • features/Screen-Space Shadows/Shaders/ScreenSpaceShadows/RaymarchCS.hlsl
  • features/Screen-Space Shadows/Shaders/ScreenSpaceShadows/ScreenSpaceShadows.hlsli
  • features/Screen-Space Shadows/Shaders/ScreenSpaceShadows/StereoSyncCS.hlsl
  • features/Screen-Space Shadows/Shaders/ScreenSpaceShadows/bend_sss_gpu.hlsli
  • features/Subsurface Scattering/Shaders/SubsurfaceScattering/Burley.hlsli
  • features/Subsurface Scattering/Shaders/SubsurfaceScattering/SeparableSSSCS.hlsl
  • features/Upscaling/Shaders/Upscaling/ClearHMDMaskCS.hlsl
  • features/Upscaling/Shaders/Upscaling/DepthRefractionUpscalePS.hlsl
  • features/Upscaling/Shaders/Upscaling/EncodeTexturesCS.hlsl
  • features/Upscaling/Shaders/Upscaling/UnderwaterMaskUpscalePS.hlsl
  • features/VR/CORE
  • features/VR/Shaders/Features/VR.ini
  • features/Volumetric Shadows/Shaders/VolumetricShadows/VolumetricShadows.hlsli
  • features/Water Effects/Shaders/WaterEffects/WaterCaustics.hlsli
  • package/SKSE/Plugins/CommunityShaders/Overrides/README.md
  • package/SKSE/Plugins/CommunityShaders/Translations/en.json
  • package/SKSE/Plugins/CommunityShaders/Translations/zh_CN.json
  • package/Shaders/Common/FrameBuffer.hlsli
  • package/Shaders/Common/MotionBlur.hlsli
  • package/Shaders/Common/ShadowSampling.hlsli
  • package/Shaders/Common/SharedData.hlsli
  • package/Shaders/Common/VR.hlsli
  • package/Shaders/DeferredCompositeCS.hlsl
  • package/Shaders/DistantTree.hlsl
  • package/Shaders/Effect.hlsl
  • package/Shaders/ISApplyVolumetricLighting.hlsl
  • package/Shaders/ISFullScreenVR.hlsl
  • package/Shaders/ISReflectionsRayTracing.hlsl
  • package/Shaders/ISSAOComposite.hlsl
  • package/Shaders/ISSAOMinify.hlsl
  • package/Shaders/ISTemporalAA.hlsl
  • package/Shaders/ISVolumetricLightingGenerateCS.hlsl
  • package/Shaders/ISWaterBlend.hlsl
  • package/Shaders/Lighting.hlsl
  • package/Shaders/Particle.hlsl
  • package/Shaders/RunGrass.hlsl
  • package/Shaders/Sky.hlsl
  • package/Shaders/Tests/TestVR.hlsl
  • package/Shaders/Tests/TestVRFlat.hlsl
  • package/Shaders/Utility.hlsl
  • package/Shaders/VR/InSceneOverlay.ps.hlsl
  • package/Shaders/VR/InSceneOverlay.vs.hlsl
  • package/Shaders/VR/StereoBlendCS.hlsl
  • package/Shaders/VR/VRPostProcessCS.hlsl
  • package/Shaders/VRStereoOptimizations/StencilCS.hlsl
  • package/Shaders/VRStereoOptimizations/StencilWritePS.hlsl
  • package/Shaders/VRStereoOptimizations/StencilWriteVS.hlsl
  • package/Shaders/VRStereoOptimizations/cbuffers.hlsli
  • package/Shaders/VRStereoOptimizations/modes.hlsli
  • package/Shaders/Water.hlsl
  • src/CSEditor/Weather/PrecipitationWidget.cpp
  • src/Deferred.cpp
  • src/Deferred.h
  • src/EngineFixes/ShadowmapCascadeCullingFix.cpp
  • src/EngineFixes/ShadowmapCascadeRasterizerFix.cpp
  • src/EngineFixes/ShadowmapCascadeRasterizerFix.h
  • src/Feature.cpp
  • src/Feature.h
  • src/FeatureConstraints.h
  • src/FeatureIssues.cpp
  • src/FeatureIssues.h
  • src/Features/CSEditor.cpp
  • src/Features/CSEditor.h
  • src/Features/CloudShadows.cpp
  • src/Features/CloudShadows.h
  • src/Features/DynamicCubemaps.cpp
  • src/Features/DynamicCubemaps.h
  • src/Features/ExponentialHeightFog.cpp
  • src/Features/ExponentialHeightFog.h
  • src/Features/ExtendedMaterials.h
  • src/Features/ExtendedTranslucency.h
  • src/Features/GrassCollision.cpp
  • src/Features/GrassCollision.h
  • src/Features/GrassLighting.h
  • src/Features/HDRDisplay.cpp
  • src/Features/HDRDisplay.h
  • src/Features/HairSpecular.h
  • src/Features/IBL.h
  • src/Features/InteriorSun.cpp
  • src/Features/InteriorSun.h
  • src/Features/InverseSquareLighting.h
  • src/Features/LODBlending.h
  • src/Features/LightLimitFix.cpp
  • src/Features/LightLimitFix.h
  • src/Features/LinearLighting.cpp
  • src/Features/LinearLighting.h
  • src/Features/PerformanceOverlay.h
  • src/Features/RenderDoc.h
  • src/Features/ScreenSpaceGI.cpp
  • src/Features/ScreenSpaceGI.h
  • src/Features/ScreenSpaceShadows.cpp
  • src/Features/ScreenSpaceShadows.h
  • src/Features/ScreenshotFeature.cpp
  • src/Features/ScreenshotFeature.h
  • src/Features/Skin.h
  • src/Features/SkySync.h
  • src/Features/Skylighting.cpp
  • src/Features/Skylighting.h
  • src/Features/SubsurfaceScattering.cpp
  • src/Features/SubsurfaceScattering.h
  • src/Features/TerrainBlending.cpp
  • src/Features/TerrainBlending.h
  • src/Features/TerrainHelper.cpp
  • src/Features/TerrainHelper.h
  • src/Features/TerrainShadows.h
  • src/Features/TerrainVariation.h
  • src/Features/UnifiedWater.cpp
  • src/Features/UnifiedWater.h
  • src/Features/Upscaling.cpp
  • src/Features/Upscaling.h
  • src/Features/Upscaling/DX12SwapChain.cpp
  • src/Features/Upscaling/FidelityFX.cpp
  • src/Features/Upscaling/RCAS/RCAS.cpp
  • src/Features/Upscaling/Streamline.cpp
  • src/Features/Upscaling/Streamline.h
  • src/Features/VR.cpp
  • src/Features/VR.h
  • src/Features/VR/InSceneOverlay.cpp
  • src/Features/VR/Input.cpp
  • src/Features/VR/OpenVRDetection.cpp
  • src/Features/VR/OpenVRDetection.h
  • src/Features/VR/OverlayDrag.cpp
  • src/Features/VR/SettingsUI.cpp
  • src/Features/VR/StereoBlend.cpp
  • src/Features/VR/WandPointing.cpp
  • src/Features/VRStereoOptimizations.cpp
  • src/Features/VRStereoOptimizations.h
  • src/Features/VolumetricLighting.cpp
  • src/Features/VolumetricLighting.h
  • src/Features/VolumetricShadows.cpp
  • src/Features/VolumetricShadows.h
  • src/Features/WaterEffects.h
  • src/Features/WetnessEffects.h
  • src/FrameAnnotations.cpp
  • src/Globals.cpp
  • src/Globals.h
  • src/Hooks.cpp
  • src/Menu.cpp
  • src/Menu.h
  • src/Menu/HomePageRenderer.cpp
  • src/Menu/OverlayRenderer.cpp
  • src/Menu/OverlayRenderer.h
  • src/Menu/SettingsTabRenderer.cpp
  • src/Menu/ThemeManager.cpp
  • src/ShaderCache.cpp
  • src/ShaderCache.h
  • src/State.cpp
  • src/State.h
  • src/TruePBR.cpp
  • src/TruePBR.h
  • src/Utils/D3D.cpp
  • src/Utils/D3D.h
  • src/Utils/Game.cpp
  • src/Utils/Game.h
  • src/Utils/GameSetting.h
  • src/Utils/Input.h
  • src/Utils/UI.cpp
  • src/Utils/UI.h
  • src/Utils/VRUtils.cpp
  • src/Utils/VRUtils.h
  • src/XSEPlugin.cpp
  • tools/verify-shader-refactor.ps1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/vigilant-haslett-56bad5

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

No actionable suggestions for changed features.

@doodlum doodlum changed the title refactor: remove all VR support chore: remove all VR support Jun 5, 2026
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

✅ A pre-release build is available for this PR:
Download

@SkrubbySkrubInAShrub

Copy link
Copy Markdown
Collaborator

also remove VR ci

@doodlum doodlum force-pushed the claude/vigilant-haslett-56bad5 branch from efe9626 to 3c55f4f Compare June 6, 2026 16:09
@doodlum

doodlum commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator Author

Done — _shared-build.yaml had the VR matrix entry removed and shader-validation-vr.yaml was deleted. The "Validate shader compilation (VR)" check still shows as failed on this PR because pull_request_target reads workflow files from the base branch (dev), not the PR branch — the fix takes effect after merge.

doodlum and others added 20 commits June 7, 2026 13:00
Remove Skyrim VR as a supported target. All VR-specific code paths,
shaders, build system options, and runtime checks are eliminated.

Build system:
- Remove ENABLE_SKYRIM_VR from CMakePresets.json (ALL, ALL-VS2022)
- Remove SkyrimVR path from CMakeUserPresets.json.template
- Remove VR shader validation matrix entry and config file
  (.github/configs/shader-validation-vr.yaml deleted)

Deleted files:
- src/Features/VR.cpp/h and entire src/Features/VR/ directory
- src/Features/VRStereoOptimizations.cpp/h
- src/Utils/VRUtils.cpp/h
- features/VR/ (CORE marker, VR.ini)
- package/Shaders/VR/ (StereoBlend, VRPostProcess, InSceneOverlay)
- package/Shaders/VRStereoOptimizations/ (all shaders, cbuffers, modes)
- package/Shaders/ISFullScreenVR.hlsl
- package/Shaders/Tests/TestVR.hlsl, TestVRFlat.hlsl
- package/Shaders/Common/VR.hlsli (no remaining callers)
- features/Screen Space GI/Shaders/ScreenSpaceGI/stereoSync.cs.hlsl
- features/Screen-Space Shadows/Shaders/ScreenSpaceShadows/StereoSyncCS.hlsl

Core C++ changes:
- Remove VR globals, FrameBufferVR struct, IsVR() branches everywhere
- Remove VR D3D hooks from Globals.cpp
- Simplify FrameBufferCache getters (no eyeIndex, no VR branches)
- Remove VR feature list filtering from Feature.cpp
- Remove stereo optimization dispatch from Deferred.cpp
- Remove VR constant buffer offsets and ISFullScreenVR from ShaderCache
- Remove VR address library check from XSEPlugin.cpp
- Remove GetEyePosition/GetCameraData VR overloads from Game.h/cpp
- Remove VRUtils and all VR utility functions

Shader changes:
- FrameBuffer.hlsli: convert all cbuffer members from [1] arrays to
  plain variables; remove eyeIndex parameters from all helpers
- Remove eyeIndex parameters from ShadowSampling.hlsli, MotionBlur.hlsli,
  SharedData.hlsli and all feature shaders (~30 files)
- Remove all #ifdef VR / #if defined(VR) dead code blocks
- Remove Stereo:: namespace calls (functions were already no-ops)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
GetVSMShadow3D and GetVSMShadow2D had their eyeIndex parameter removed
but two call sites in ShadowSampling.hlsli still passed a literal 0 as
that argument, shifting it onto the out param and causing X3025 (l-value
specifies const object) at runtime.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Lighting.hlsl was calling SharedData::GetWaterData with a spurious
second argument (the old eyeIndex=0) after the parameter was removed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove spurious trailing 0 (old eyeIndex) from calls to:
- ShadowSampling::GetWorldShadow (Lighting, RunGrass, ISVolumetricLightingGenerateCS)
- ShadowSampling::Get3DFilteredShadow (Water)
- MotionBlur::GetSSMotionVector (RunGrass)
- ScreenSpaceShadows::GetScreenSpaceShadow (Lighting, RunGrass)
- Hair::HairSelfShadow (Lighting)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Lighting.hlsl passed a spurious 0 before the out param dirVSMDetailedShadow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ght calls

Two additional HairSelfShadow calls in the point light loop in Lighting.hlsl
still had the old eyeIndex=0 argument.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- FrameBuffer.hlsli: remove unused 'stereo' default parameter from
  ClampDynamicResolutionAdjustedScreenPosition and both overloads of
  GetDynamicResolutionAdjustedScreenPosition
- Water.hlsl: remove unused 'a_useVR' default parameter from
  GetScreenDepthWater
- Delete ClearHMDMaskCS.hlsl (VR-only HMD mask compute shader with no
  C++ callers)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- VolumetricFogConservativeDepthCS.hlsl: remove stale ', 0' eyeIndex
  args from ConvertUVToSampleCoord calls
- en.json: regenerate to remove 3 deleted VR upscaling translation keys
  (feature.upscaling.native_inputs, upscaling_intermediates, view_resize)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- LightLimitFix.h: remove unused 'eyeCount' member (was used to loop
  over VR eyes, always 1 since VR removal)
- Upscaling.h/cpp: remove eyeOffsetX from UpscalingDataCB struct and
  unwrap the numEyes=1 loop — renderWidth is now used directly
- EncodeTexturesCS.hlsl: remove EyeOffsetX cbuffer field and replace
  all srcCoord uses with dispatchID.xy directly
- docs/new-feature-template/NewFeatureReadme.md: update cross-platform
  note from SE/AE/VR to SE/AE, remove VR checklist item

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Shader cbuffer changes (all shaders):
- Convert all World[1], PreviousWorld[1], WorldViewProj[1], WorldView[1],
  EyePos[1], EyePosition[1], PosAdjust[1], QPosAdjust[1], TextureProj[1],
  ScreenProj[1], ViewProj[1], HighDetailRange[1], BonesPivot[1],
  PreviousBonesPivot[1], CameraViewProj[1], CameraViewProjInverse[1],
  WindInput[1], VolumetricFogClipToWorld[2] from [N] arrays to plain vars
- Convert ShadowMapProj[1][3] to ShadowMapProj[3] (remove eye dimension)
- Update all X[0] accesses to X, and X[0][n] row accesses to X[n]

C++ changes:
- ExponentialHeightFog: clipToWorld[2] -> plain, remove redundant [1] fill
- LightLimitFix: eyePositionCached[1] -> plain
- Upscaling: encodeTexturesCS[5] -> [4], remove dead encodeTexturesCSDepthOutput
- D3D.h/D3D.cpp/FrameAnnotations.cpp: inline GetRenderTargetCount() and
  GetDepthStencilCount() -> RE::RENDER_TARGETS::kTOTAL etc., remove functions
- Game.h/all call sites: inline GET_INSTANCE_MEMBER and GET_INSTANCE_MEMBER_PTR
  macros, remove macro definitions

i18n:
- DynamicCubemaps: remove key_feature_4 (VR-specific 'standard rendering modes'),
  rename key_feature_5 -> key_feature_4
- Regenerate en.json (2083 keys), re-sort zh_CN.json

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- zh_CN.json: rename key_feature_5 -> key_feature_4 for dynamic_cubemaps
- LightLimitFix.h: remove duplicate key_feature_5 (same text as key_feature_4)
- Regenerate en.json (2082 keys)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ShaderCache.h: remove GetFlat() from LightingPS/GrassPS/EffectPS —
  named 'Flat' to contrast with a VR variant that no longer exists;
  inline as default constructor directly in Get()
- ScreenshotFeature.cpp: suppress C4244 double->float warning from
  third-party sk_hdr_png.hpp header with pragma push/pop

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove the cached float2 screenSize from State. All call sites now read
directly from globals::game::graphicsState->screenWidth/screenHeight
(RE::BSGraphics::State) which is the authoritative game viewport.

- State.h: remove float2 screenSize member
- State.cpp: remove the screenSize assignment from texture dimensions;
  BufferDim and MipBias now read graphicsState directly
- All other call sites (~13 files) updated to use graphicsState

Also remove now-unused 'auto state = globals::state' local declarations
left in ScreenSpaceShadows, FidelityFX, and Streamline functions where
the only previous use was state->screenSize.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
LightData::positionWS[2] -> positionWS:
- LightLimitFix.h: PositionOpt positionWS[2] -> plain positionWS
- LightLimitFix.cpp: positionWS[0].data -> positionWS.data
- Common.hlsli: float4 positionWS[2] -> float4 positionWS
- All shader consumers: light.positionWS[0].xyz -> light.positionWS.xyz
  (Effect, Lighting, Particle, RunGrass, Water, VolumetricFog, ClusterCulling)
- Debug format string: remove stale positionWS[1] reference

SSGICB PrevInvViewMat[2] / NDCToViewMul[2] / NDCToViewAdd[2]:
- ScreenSpaceGI.h: flatten to plain float4x4 / float4 / float4
- ScreenSpaceGI.cpp: static prevInvView[2] -> plain; remove [0] indexing
- common.hlsli: float4x4 PrevInvViewMat[2] -> float4x4 PrevInvViewMat
- radianceDisocc.cs.hlsl: PrevInvViewMat[0] -> PrevInvViewMat

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Util::GetAverageEyePosition() -> GetEyePosition()
  (previously averaged left+right eye in VR; now just returns single
  camera eye position)
- TerrainBlending::averageEyePosition -> eyePosition
  (same naming artifact)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- LightLimitFix.cpp: replace direct posAdjust.getEye(0) with
  Util::GetEyePosition() for consistency with all other callers
- LightLimitFix.cpp: clarify misleading cache comment (data comes from
  frameBufferCached, not from cameraData)
- .claude/CLAUDE.md: remove VR presets (VR, PRE-AE), SkyrimVR deployment
  path, VR shader validation command, VR runtime patterns, VRUtils entry,
  and all references to VR as a supported target

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Strip dead VR third argument from 32 REL::Relocate(se, ae, vr) calls
across 14 files — with ENABLE_SKYRIM_VR=OFF the third arg compiled
away but was still dead code clutter.

VR-only REL::Relocate(0, 0, vr) expressions replaced:
- TerrainBlending.cpp: VR-only kCallerRva* constants → removed;
  allowlists now explicitly empty (auto-broad fallback handles SE/AE)
- ShadowmapCascadeRasterizerFix.h: REL::Relocate<uintptr_t>(0,0,vr)
  → static_cast<uintptr_t>(0) (INI/GameSetting fallback on SE/AE)

Other fixes:
- ScreenSpaceGI.cpp: cameraData.getEye(0) → getEye() (remove explicit
  VR-awareness from the default-arg call)
- Globals.h: remove empty 'namespace llf {}' stub

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove remaining VR references from docs, CI scripts, tools,
and translation files:
- Fix stale zh_CN.json orphan key (light_limit_fix.key_feature_5)
- Remove VR from AI/Copilot instructions, README, coderabbit example
- Clean generate-shader-configs.ps1 of SkyrimVR detection
- Update verify-shader-refactor.ps1 default permutations (drop VR)
- Fix DispatchEye -> Dispatch in ScreenSpaceShadows; remove dead eyeName param
- Remove stale VR comments from SSGI shaders and TerrainBlending
- Update Overrides/README.md feature list (remove VR entry)
- Sync containerbuild.ps1 path replace with cleaned template

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@doodlum doodlum force-pushed the claude/vigilant-haslett-56bad5 branch from 3c55f4f to 7ceb37d Compare June 7, 2026 12:00
@doodlum doodlum merged commit b48bf24 into dev Jun 7, 2026
13 of 14 checks passed
ParticleTroned pushed a commit to ParticleTroned/skyrim-community-shaders that referenced this pull request Jun 11, 2026
Sync of upstream community-shaders/skyrim-community-shaders v1.7.0-rc.1 into the
Open Shaders fork. This fork is the VR maintainer, so the resolution strategy is
keep-ours for all VR-divergent code while adopting upstream's new non-VR features.

Two-step mechanic (see follow-up revert commit):
  Upstream's `chore: remove all VR support (community-shaders#2475)` (b48bf24) is an ancestor of
  v1.7.0-rc.1. A plain merge silently adopts its VR deletions on every line our
  dev left unchanged -- it touched 197 files; only 56 collided as conflicts, so
  ~148 files would silently lose VR (confirmed: Deferred.h hook installs dropped
  their VR REL::Relocate 3rd offset with no conflict marker). This merge commit
  resolves the 56 marked conflicts; the immediately-following `Revert "community-shaders#2475"`
  commit restores VR everywhere the plain merge stripped it.

Conflict resolution (56 files):
  Shaders -- keep-ours VR (Lighting/Effect/Particle/RunGrass/ISReflectionsRayTracing/
    ISTemporalAA/ISWaterBlend/ShadowSampling/VolumetricShadows/FrameBuffer). Lighting.hlsl
    adopts upstream's new Skin/CS_SKIN block (VR-adapted CameraPosAdjust[eyeIndex]) and
    drops its duplicate shadowColor decl (our directional-shadow path owns it).
    WaterCaustics adopts upstream's chromatic-dispersion caustics.
  Hooks.cpp/.h -- MERGE: our 3 BSBatchRenderer RenderPassImmediately UAF-guard thunks
    plus upstream's Sky_UpdateColors (SkySync feature).
  Core C++ -- keep-ours VR for Deferred, DynamicCubemaps, LightLimitFix, Upscaling
    (PerfMode/foveated DLSS), FrameAnnotations, Skylighting, TruePBR, ShaderCache,
    Utils (D3D/Game/UI), Globals (FrameBufferVR restored, isVR source of truth),
    Feature (SupportsVR restored). Menu.cpp/HomePageRenderer keep Open Shaders
    branding and the fork links (Nexus 180419, alandtse/open-shaders); the upstream
    Discord banner is intentionally not re-added.
  Adopted from upstream -- i18n framework (Feature.h includes I18n/I18n.h; GetDisplayName
    T() names), CSEditor rename (community-shaders#2449, was WeatherEditor), ExponentialHeightFog,
    custom theme cursor, csEditor weather editor (EditorWindow + weather widgets).

Deferred (keep-ours now, follow-up PRs): per-feature i18n string wrapping on the
large fork-divergent DrawSettings (LLF/SSGI/VL/RenderDoc/DynamicCubemaps -- English
fallback works); upstream's HDR-PNG screenshot export (our ScreenshotFeature kept its
VR Subrect per-eye presets).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ParticleTroned pushed a commit to ParticleTroned/skyrim-community-shaders that referenced this pull request Jun 11, 2026
…ore VR)

This reverts upstream b48bf24 within the v1.7.0 sync. The plain merge let
community-shaders#2475's VR deletions win silently on ~148 files our dev left unchanged; this
revert restores VR everywhere it was stripped. Conflicts with our newer VR
(foveated SSR community-shaders#82, isVR refactor community-shaders#113, stereo-opts, restored VRStereoOptimizations
and Features/VR/*) were resolved keep-ours -- the merge commit already holds the
correct, current VR state for those files.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ParticleTroned pushed a commit to ParticleTroned/skyrim-community-shaders that referenced this pull request Jun 11, 2026
Parallel upstream/fork audits of the v1.7.0 merge surfaced two VR regressions
invisible to the C++ build (HLSL not compiled there; the offsets are runtime):
- ISTemporalAA.hlsl: drop orphaned #endif (revert artifact) that unbalanced the
  preprocessor and would fail CI shader validation / TAA at runtime.
- Hooks.cpp: restore the VR (3rd) REL::Relocate offset on three render-target
  thunks the silent community-shaders#2475 strip removed (precip-mask depth 0x1917, cubemap
  reflections 0xCD2, depth reflections 0xD13) -- merge took the 2-arg form on
  non-conflicting lines and the revert didn't touch Hooks.cpp.
- CMakeLists: add /bigobj (LLF ShadowCasterManager.cpp exceeds the COFF section
  limit on a fresh compile after the merge grew its includes).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ParticleTroned pushed a commit to ParticleTroned/skyrim-community-shaders that referenced this pull request Jun 11, 2026
VR runtime smoke (SteamVR null-driver headless rig) caught a real CTD the
DLL/SE-smoke gates couldn't: an EXCEPTION_ACCESS_VIOLATION in
BSShaderRenderTargets::Create (id 100458) +0xF4B.

- Hooks.cpp: upstream's new CreateRenderTarget_Water1/Water2 hooks (community-shaders#2484, water
  RT fp16 promotion) shipped 2-arg REL::Relocate (no VR offset). On VR they wrote
  a CALL at the SE offset inside Create -> corrupted the function -> AV on the
  render thread. RE'd the VR call sites in SkyrimVR.exe Create (targets 0x59/0x5a):
  Water1 VR +0x12C2, Water2 VR +0x12D8 (cross-checked monotonic vs UnderwaterMask
  0xE06 < Water 0x12C2/0x12D8 < PrecipitationMask 0x1917). Now 3-arg, works on VR.
- Upscaling.cpp: drop the duplicate "Depth VR Propagate" block the community-shaders#2475 revert
  re-added beside our existing one (dev had exactly one, gated isVR &&
  depthUpscaleActive). The sacred propagate stays; only the redundant copy removed.

A parallel fork-feature-loss audit (dev 6728765 vs HEAD) found NO genuine fork
losses: all removed capabilities were either relocated/preserved or upstream PR
removals (e.g. SkySync Sun Position Offsets removed by upstream community-shaders#2408 -- evolution,
not loss). All fork features (VR, foveated, LLF superset, branding, UAF hooks,
community-shaders#115, sacred propagate) confirmed intact.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants